import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import store from "@/store"
console.log(store);

const root = ReactDOM.createRoot(document.getElementById('root'))

root.render(
    <App />
)

//store对象上有一个subscribe订阅方法,一旦store中的数据发生更新,则subscribe回调函数就会执行
store.subscribe(()=>{
  root.render(
    <App />
  )
})


